package com.stu.mapper;

import com.stu.pojo.Login;
import com.stu.Dto.StuLoginDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface LoginMapper {

    //根据用户名和密码进行查询 管理员
    @Select("select * from emp where username = #{username} and password = #{password}")
    Login getKey(Login login);

    //根据用户名和密码进行查询 学生
    @Select("select id,stu_id,password,name from stu_basic_information where stu_id = #{stuId} and password = #{password}")
    StuLoginDto getStuKey(StuLoginDto login);
}
